Using strip() method to remove the newline character from a string

31

# strip() method to remove newline characters from a string
text= "\n Welcome to Python Programming \n"
print(text.strip())

Comments

Submit
0 Comments